package com.learn.springboot.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.StringJoiner;

/**
 * @author wangxing
 * @version 2020/8/3 10:16 Administrator
 */
@Component
public class ParamInfo {
    @Value("${user.author}")
    private String author;
    @Value("${user.sex}")
    private String sex;
    @Value("${user.age}")
    private Integer age;
    @Value("${user.date}")
    private String date;

    @Override
    public String toString() {
        return new StringJoiner(", ", ParamInfo.class.getSimpleName() + "[", "]")
                .add("author='" + author + "'")
                .add("sex='" + sex + "'")
                .add("age=" + age)
                .add("date=" + date)
                .toString();
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }
}
